<ui:composition template="/admin/templates/ui2.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:composite="http://java.sun.com/jsf/composite/primefaces"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:archer="http://java.sun.com/jsf/archer"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
	<f:metadata>
		<f:viewParam name="id" value="#{cookbookHome.id}"></f:viewParam>
	</f:metadata>
	<ui:define name="content">
		<div class="entry">
			<p:toolbar styleClass="admin-nav-toolbar">
				<p:toolbarGroup>
					<h:outputLabel value="#{commonMsg.currentPositionLabel} 新菜单"></h:outputLabel>
				</p:toolbarGroup>
				<p:toolbarGroup align="right">
					<p:separator />
					<p:button outcome="/admin/order/cookbookList" value="瞅瞅每期菜单"></p:button>
				</p:toolbarGroup>
			</p:toolbar>
			<p:spacer></p:spacer>
			<h:form id="form">
				<h:panelGrid columns="2" columnClasses="col1,col2" id="panel">

					
					<h:outputLabel value="起止时间"></h:outputLabel>
					<ui:fragment>
						<p:calendar value="#{cookbookHome.instance.startDate}" label="起始时间"
							required="true" pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
						</p:calendar>
						<p:calendar value="#{cookbookHome.instance.endDate}" label="结束时间"
							required="true" pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
						</p:calendar>
					</ui:fragment>
					
					<h:outputText value="第一天"></h:outputText>
					<ui:fragment>
						<p:calendar value="#{cookbookHome.dayFoods[0].date}" label="第一天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday1" />
						</p:calendar>
						<h:inputText id= "weekday1" value="#{cookbookHome.dayFoods[0].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[0].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[0].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
							
						
						<ui:fragment rendered="#{cookbookHome.instance.count == 1}">
							<p:commandLink action="#{cookbookHome.countAdd(0)}" ajax="false"
								value="再加一天的">
								<f:ajax execute="@this" render="day2label day2"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					</ui:fragment>
					
					
					
					
					<ui:fragment id="day2label" rendered="#{cookbookHome.instance.count gt 1 or cookbookHome.dayFoods[1].date != null}">
						<h:outputText  value="第二天"></h:outputText>
					</ui:fragment>
					<ui:fragment id="day2" rendered="#{cookbookHome.instance.count gt 1 or cookbookHome.dayFoods[1].date != null}">
						<p:calendar value="#{cookbookHome.dayFoods[1].date}" label="第二天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday2" />
						</p:calendar>
						<h:inputText id= "weekday2" value="#{cookbookHome.dayFoods[1].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[1].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[1].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
								
							
						<ui:fragment rendered="#{cookbookHome.instance.count == 2}">
							<p:commandLink action="#{cookbookHome.countAdd(0)}" ajax="false"
								value="再加一天的">
								<f:ajax execute="@this" render="day3label day3"></f:ajax>
							</p:commandLink>
							<p:commandLink action="#{cookbookHome.countAdd(1)}" ajax="false"
								value="减去一天的">
								<f:ajax execute="@this" render="day2label day2"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					
					</ui:fragment>
					
					
					
					
					
					
					
					<ui:fragment id="day3label" rendered="#{cookbookHome.instance.count gt 2 or cookbookHome.dayFoods[2].date != null}">
						<h:outputText  value="第三天"></h:outputText>
					</ui:fragment>
					<ui:fragment id="day3" rendered="#{cookbookHome.instance.count gt 2 or cookbookHome.dayFoods[2].date != null}">
						<p:calendar value="#{cookbookHome.dayFoods[2].date}" label="第三天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday3" />
						</p:calendar>
						<h:inputText id= "weekday3" value="#{cookbookHome.dayFoods[2].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[2].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[2].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
								
							
						<ui:fragment rendered="#{cookbookHome.instance.count == 3}">
							<p:commandLink action="#{cookbookHome.countAdd(0)}" ajax="false"
								value="再加一天的">
								<f:ajax execute="@this" render="day4 day4label"></f:ajax>
							</p:commandLink>
							<p:commandLink action="#{cookbookHome.countAdd(2)}" ajax="false"
								value="减去一天的">
								<f:ajax execute="@this" render="day3 day3label"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					
					</ui:fragment>
					
				
					
					
					<ui:fragment id="day4label" rendered="#{cookbookHome.instance.count gt 3 or cookbookHome.dayFoods[3].date != null}">
						<h:outputText  value="第四天"></h:outputText>
					</ui:fragment>
					<ui:fragment id="day4" rendered="#{cookbookHome.instance.count gt 3 or cookbookHome.dayFoods[3].date != null}">
						<p:calendar value="#{cookbookHome.dayFoods[3].date}" label="第四天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday4" />
						</p:calendar>
						<h:inputText id= "weekday4" value="#{cookbookHome.dayFoods[3].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[3].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[3].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
								
							
						<ui:fragment rendered="#{cookbookHome.instance.count == 4}">
							<p:commandLink action="#{cookbookHome.countAdd(0)}" ajax="false"
								value="再加一天的">
								<f:ajax execute="@this" render="day5 day5label"></f:ajax>
							</p:commandLink>
							<p:commandLink action="#{cookbookHome.countAdd(3)}" ajax="false"
								value="减去一天的">
								<f:ajax execute="@this" render="day4label day4"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					
					</ui:fragment>
					
					
					<ui:fragment id="day5label" rendered="#{cookbookHome.instance.count gt 4 or cookbookHome.dayFoods[4].date != null}">
						<h:outputText  value="第五天"></h:outputText>
					</ui:fragment>
					<ui:fragment id="day5" rendered="#{cookbookHome.instance.count gt 4 or cookbookHome.dayFoods[4].date != null}">
						<p:calendar value="#{cookbookHome.dayFoods[4].date}" label="第五天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday5" />
						</p:calendar>
						<h:inputText id= "weekday5" value="#{cookbookHome.dayFoods[4].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[4].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[4].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
								
							
						<ui:fragment rendered="#{cookbookHome.instance.count == 5}">
							<p:commandLink action="#{cookbookHome.countAdd(0)}" ajax="false"
								value="再加一天的">
								<f:ajax execute="@this" render="day6label day6"></f:ajax>
							</p:commandLink>
							<p:commandLink action="#{cookbookHome.countAdd(4)}" ajax="false"
								value="减去一天的">
								<f:ajax execute="@this" render="day5label day5"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					
					</ui:fragment>
					
					
					<ui:fragment id="day6label" rendered="#{cookbookHome.instance.count gt 5 or cookbookHome.dayFoods[5].date != null}">
						<h:outputText  value="第六天"></h:outputText>
					</ui:fragment>
					<ui:fragment id="day6" rendered="#{cookbookHome.instance.count gt 5 or cookbookHome.dayFoods[5].date != null}">
						<p:calendar value="#{cookbookHome.dayFoods[5].date}" label="第六天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday6" />
						</p:calendar>
						<h:inputText id= "weekday6" value="#{cookbookHome.dayFoods[5].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[5].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[5].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
								
							
						<ui:fragment rendered="#{cookbookHome.instance.count == 6}">
							<p:commandLink action="#{cookbookHome.countAdd(0)}" ajax="false"
								value="再加一天的">
								<f:ajax execute="@this" render="day7label day7"></f:ajax>
							</p:commandLink>
							<p:commandLink action="#{cookbookHome.countAdd(5)}" ajax="false"
								value="减去一天的">
								<f:ajax execute="@this" render="day6label day6"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					
					</ui:fragment>
					
					
					<ui:fragment id="day7label" rendered="#{cookbookHome.instance.count gt 6 or cookbookHome.dayFoods[6].date != null}">
						<h:outputText  value="第七天"></h:outputText>
					</ui:fragment>
					<ui:fragment id="day7" rendered="#{cookbookHome.instance.count gt 6 or cookbookHome.dayFoods[6].date != null}">
						<p:calendar value="#{cookbookHome.dayFoods[6].date}" label="第七天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday7" />
						</p:calendar>
						<h:inputText id= "weekday7" value="#{cookbookHome.dayFoods[6].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[6].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[6].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
								
							
						<ui:fragment rendered="#{cookbookHome.instance.count == 7}">
							<p:commandLink action="#{cookbookHome.countAdd(0)}" ajax="false"
								value="再加一天的">
								<f:ajax execute="@this" render="day8label day8"></f:ajax>
							</p:commandLink>
							<p:commandLink action="#{cookbookHome.countAdd(6)}" ajax="false"
								value="减去一天的">
								<f:ajax execute="@this" render="day7label day7"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					
					</ui:fragment>
					
					
					<ui:fragment id="day8label" rendered="#{cookbookHome.instance.count gt 7 or cookbookHome.dayFoods[7].date != null}">
						<h:outputText  value="第八天"></h:outputText>
					</ui:fragment>
					<ui:fragment id="day8" rendered="#{cookbookHome.instance.count gt 7 or cookbookHome.dayFoods[7].date != null}">
						<p:calendar value="#{cookbookHome.dayFoods[7].date}" label="第八天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday8" />
						</p:calendar>
						<h:inputText id= "weekday8" value="#{cookbookHome.dayFoods[7].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[7].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[7].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
								
							
						<ui:fragment rendered="#{cookbookHome.instance.count == 8}">
							<p:commandLink action="#{cookbookHome.countAdd(0)}" ajax="false"
								value="再加一天的">
								<f:ajax execute="@this" render="day9label day9"></f:ajax>
							</p:commandLink>
							<p:commandLink action="#{cookbookHome.countAdd(7)}" ajax="false"
								value="减去一天的">
								<f:ajax execute="@this" render="day8label day8"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					
					</ui:fragment>
					
					
					<ui:fragment id="day9label" rendered="#{cookbookHome.instance.count gt 8 or cookbookHome.dayFoods[8].date != null}">
						<h:outputText  value="第九天"></h:outputText>
					</ui:fragment>
					<ui:fragment id="day9" rendered="#{cookbookHome.instance.count gt 8 or cookbookHome.dayFoods[8].date != null}">
						<p:calendar value="#{cookbookHome.dayFoods[8].date}" label="第九天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday9" />
						</p:calendar>
						<h:inputText id= "weekday9" value="#{cookbookHome.dayFoods[8].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[8].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[8].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
								
							
						<ui:fragment rendered="#{cookbookHome.instance.count == 9}">
							<p:commandLink action="#{cookbookHome.countAdd(0)}" ajax="false"
								value="再加一天的">
								<f:ajax execute="@this" render="day10label day10"></f:ajax>
							</p:commandLink>
							<p:commandLink action="#{cookbookHome.countAdd(8)}" ajax="false"
								value="减去一天的">
								<f:ajax execute="@this" render="day9label day9"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					
					</ui:fragment>
					
					
					<ui:fragment id="day10label" rendered="#{cookbookHome.instance.count gt 9 or cookbookHome.dayFoods[9].date != null}">
						<h:outputText  value="第十天"></h:outputText>
					</ui:fragment>
					<ui:fragment id="day10" rendered="#{cookbookHome.instance.count gt 9 or cookbookHome.dayFoods[9].date != null}">
						<p:calendar value="#{cookbookHome.dayFoods[9].date}" label="第十天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday10" />
						</p:calendar>
						<h:inputText id= "weekday10" value="#{cookbookHome.dayFoods[9].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[9].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[9].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
								
							
						<ui:fragment rendered="#{cookbookHome.instance.count == 10}">
							<p:commandLink action="#{cookbookHome.countAdd(0)}" ajax="false"
								value="再加一天的">
								<f:ajax execute="@this" render="day11label day11"></f:ajax>
							</p:commandLink>
							<p:commandLink action="#{cookbookHome.countAdd(9)}" ajax="false"
								value="减去一天的">
								<f:ajax execute="@this" render="day10label day10"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					
					</ui:fragment>
					
					
					<ui:fragment id="day11label" rendered="#{cookbookHome.instance.count gt 10 or cookbookHome.dayFoods[10].date != null}">
						<h:outputText  value="第十一天"></h:outputText>
					</ui:fragment>
					<ui:fragment id="day11" rendered="#{cookbookHome.instance.count gt 10 or cookbookHome.dayFoods[10].date != null}">
						<p:calendar value="#{cookbookHome.dayFoods[10].date}" label="第十一天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday11" />
						</p:calendar>
						<h:inputText id= "weekday11" value="#{cookbookHome.dayFoods[10].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[10].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[10].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
								
							
						<ui:fragment rendered="#{cookbookHome.instance.count == 11}">
							<p:commandLink action="#{cookbookHome.countAdd(0)}" ajax="false"
								value="再加一天的">
								<f:ajax execute="@this" render="day12label day12"></f:ajax>
							</p:commandLink>
							<p:commandLink action="#{cookbookHome.countAdd(10)}" ajax="false"
								value="减去一天的">
								<f:ajax execute="@this" render="day11label day11"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					
					</ui:fragment>
					
					
					<ui:fragment id="day12label" rendered="#{cookbookHome.instance.count gt 11 or cookbookHome.dayFoods[11].date != null}">
						<h:outputText  value="第十二天"></h:outputText>
					</ui:fragment>
					<ui:fragment id="day12" rendered="#{cookbookHome.instance.count gt 11 or cookbookHome.dayFoods[11].date != null}">
						<p:calendar value="#{cookbookHome.dayFoods[11].date}" label="第十二天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday12" />
						</p:calendar>
						<h:inputText id= "weekday12" value="#{cookbookHome.dayFoods[11].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[11].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[11].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
								
							
						<ui:fragment rendered="#{cookbookHome.instance.count == 12}">
							<p:commandLink action="#{cookbookHome.countAdd(0)}" ajax="false"
								value="再加一天的">
								<f:ajax execute="@this" render="day13label day13"></f:ajax>
							</p:commandLink>
							<p:commandLink action="#{cookbookHome.countAdd(11)}" ajax="false"
								value="减去一天的">
								<f:ajax execute="@this" render="day12label day12"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					
					</ui:fragment>
					
					
					<ui:fragment id="day13label" rendered="#{cookbookHome.instance.count gt 12 or cookbookHome.dayFoods[12].date != null}">
						<h:outputText  value="第十三天"></h:outputText>
					</ui:fragment>
					<ui:fragment id="day13" rendered="#{cookbookHome.instance.count gt 12 or cookbookHome.dayFoods[12].date != null}">
						<p:calendar value="#{cookbookHome.dayFoods[12].date}" label="第十三天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday13" />
						</p:calendar>
						<h:inputText id= "weekday13" value="#{cookbookHome.dayFoods[12].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[12].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[12].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
								
							
						<ui:fragment rendered="#{cookbookHome.instance.count == 13}">
							<p:commandLink action="#{cookbookHome.countAdd(0)}" ajax="false"
								value="再加一天的">
								<f:ajax execute="@this" render="day14label day14"></f:ajax>
							</p:commandLink>
							<p:commandLink action="#{cookbookHome.countAdd(12)}" ajax="false"
								value="减去一天的">
								<f:ajax execute="@this" render="day13label day13"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					
					</ui:fragment>
					
					
					<ui:fragment id="day14label" rendered="#{cookbookHome.instance.count gt 13 or cookbookHome.dayFoods[13].date != null}">
						<h:outputText  value="第十四天"></h:outputText>
					</ui:fragment>
					<ui:fragment id="day14" rendered="#{cookbookHome.instance.count gt 13 or cookbookHome.dayFoods[13].date != null}">
						<p:calendar value="#{cookbookHome.dayFoods[13].date}" label="第十四天"
							 pattern="yyyy-MM-dd" timeZone="GMT+8"
							navigator="true" showButtonPanel="true">
							<p:ajax event="dateSelect" listener="#{cookbookHome.getDayFoods()}" update="weekday14" />
						</p:calendar>
						<h:inputText id= "weekday14" value="#{cookbookHome.dayFoods[13].weekday}" readonly="true"></h:inputText>
						
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[13].food1}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
						<h:selectOneMenu  value="#{cookbookHome.dayFoods[13].food2}" converter="archer.EntityConverter">
							<f:selectItem itemValue="" itemLabel="请选择"/>
							<f:selectItems var="food" value="#{foodList.foodList}"
								itemLabel="#{food.name}" itemValue="#{food}"/>
						</h:selectOneMenu>
								
							
						<ui:fragment rendered="#{cookbookHome.instance.count == 14}">
							<p:commandLink action="#{cookbookHome.countAdd(13)}" ajax="false"
								value="减去一天的">
								<f:ajax execute="@this" render="day14label day14"></f:ajax>
							</p:commandLink>
						</ui:fragment>
					
					</ui:fragment>
					
					



					<h:outputLabel value="#{commonMsg.actionLabel}"></h:outputLabel>
					<ui:fragment>
						<h:inputHidden value="#{cookbookHome.instance.id}"></h:inputHidden>
						<p:commandButton id="saveBtn" action="#{cookbookHome.save}"
							ajax="false" value="#{commonMsg.saveLabel}"></p:commandButton>
						<p:commandButton type="reset" value="#{commonMsg.resetLabel}"></p:commandButton>
						<p:commandButton action="#{cookbookHome.test()}" ajax="false"
							value="测试"></p:commandButton>
					</ui:fragment>
				</h:panelGrid>


			</h:form>
		</div>
	</ui:define>
</ui:composition>

